import request from "@/utils/request";
import { anyObjModel } from "./category";

export default {
  getCartList(){
    return request.get<any,anyObjModel[]>(`/api/cart/cartList`)
  },
  changeCheck(skuID:string,isChecked:string){
    return request.get(`/api/cart/checkCart/${skuID}/${isChecked}`)
  },
  // /api/cart/addToCart/{ skuId }/{ skuNum }
  addToCart(skuId:string,skuNum:string){
    return request.post(`/api/cart/addToCart/${ skuId }/${ skuNum }`)
  },
  delCartGoods(skuId:string){
    return request.delete<any,anyObjModel>(`/api/cart/deleteCart/${skuId}`)
  }
}